package com.tmpt.controller.springmvc.handlers;
import com.tmpt.controller.springmvc.PageUtils;
import com.tmpt.dto.Result;
import com.tmpt.utils.JsonPaginationUtils;
import com.tmpt.utils.StringUtils;
import com.tmpt.utils.WebUtils;
import com.tmptSource.dto.OwAdvShopbrandBasicInfoDto;
import com.tmptSource.dto.OwDoorRespInfoDto;
import com.tmptSource.dto.PageDto;
import com.tmptSource.service.intf.IOwAdvShopbrandBasicInfoService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Helen
 * @title: OwAdvShopbrandBasicInfoAction
 * @version 1.0
 * @date 2020/5/4 11:20
 * @Description:
 */

@Controller
@RequestMapping("/springmvc/advShopbrandBasicInfo")
public class OwAdvShopbrandBasicInfoAction {
    private Logger log = Logger.getLogger(this.getClass());
    @Resource
    private IOwAdvShopbrandBasicInfoService owAdvShopbrandBasicInfoService;

    @RequestMapping(value = "/querAdvShopbrandBasicInfoList")
    @ResponseBody
    public Result queryDoorRespListWithoutLogin(OwAdvShopbrandBasicInfoDto owAdvShopbrandBasicInfoDto, PageDto pageDto, HttpServletRequest request){
        HttpSession session = request.getSession();

        Result<OwAdvShopbrandBasicInfoDto> result = new Result();
        try {
            pageDto = PageUtils.resetPageDto(pageDto);

            //调用远程服务
            result =  owAdvShopbrandBasicInfoService.pagination(owAdvShopbrandBasicInfoDto, pageDto);
            return result;
        } catch (Exception e) {
            e.printStackTrace();
            return result.fault(e.getLocalizedMessage());
        }finally {
        }
    }
}
